﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

class QPropertyAnimation;

QT_BEGIN_NAMESPACE

class QTranslator;

namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_menuBtn_clicked();

    void on_closeBtn_clicked();

    void on_minimizeBtn_clicked();

    void on_restoreBtn_clicked();

    void on_settingsBtn_clicked();

    void on_closeMoreMenuBtn_clicked();

    void on_profileBtn_clicked();

    void on_colseRightMenuBtn_clicked();

    void on_moreBtn_clicked();

    void on_homeBtn_clicked();

    void on_dataBtn_clicked();

    void on_reportBtn_clicked();

    void on_infoBtn_clicked();

    void on_helpBtn_clicked();

    void on_notificationBtn_clicked();

    void on_closeNotificationBtn_clicked();

    void on_languageComb_currentIndexChanged(int index);

private:
    Ui::MainWindow *ui;

    bool isDragging = false;
    QPoint dragPos;
    QTranslator* m_translator;
    QString m_settingsFileName;

    void initUI();

    void initSettings();

    void changeLanguage(QString targetLanguage);

    QPropertyAnimation* ani_leftMenuContainer,*ani_centerMenuContainer,*ani_rightMenuContainer,*ani_popupNotificationContainer;

    void playLeftMenuContainerAnimation();

    void playCenterMenuContainerAnimation();

    void playRightMenuContainerAnimation();

    void playPopupNotificationContainerAnimation();

protected:
    void mousePressEvent(QMouseEvent *event) override;

    void mouseMoveEvent(QMouseEvent *event) override;

    void mouseReleaseEvent(QMouseEvent *event) override;

};
#endif // MAINWINDOW_H
